package hl.model;
// Generated 2018-5-23 16:55:06 by Hibernate Tools 4.3.5.Final

import java.util.Date;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToMany;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * TGroupCourse generated by hbm2java
 */
@Entity
@Table(name = "t_group_course", catalog = "matcha_gym")
public class TGroupCourse implements java.io.Serializable {

	private Long pkGroupCourse;
	private TCoach TCoach;
	private TCourseDetail TCourseDetail;
	private TPlace TPlace;
	private String name;
	private Date beginDatetime;
	private Date endDatetime;
	private Date cdatetime;
	private Date mdatetime;
	private String place;
	private Set<TMember> TMembers = new HashSet<TMember>(0);

	public TGroupCourse() {
	}

	public TGroupCourse(TCoach TCoach, TCourseDetail TCourseDetail, TPlace TPlace, String name, Date beginDatetime,
			Date endDatetime, Date cdatetime, Date mdatetime, String place, Set<TMember> TMembers) {
		this.TCoach = TCoach;
		this.TCourseDetail = TCourseDetail;
		this.TPlace = TPlace;
		this.name = name;
		this.beginDatetime = beginDatetime;
		this.endDatetime = endDatetime;
		this.cdatetime = cdatetime;
		this.mdatetime = mdatetime;
		this.place = place;
		this.TMembers = TMembers;
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)

	@Column(name = "PK_GROUP_COURSE", unique = true, nullable = false)
	public Long getPkGroupCourse() {
		return this.pkGroupCourse;
	}

	public void setPkGroupCourse(Long pkGroupCourse) {
		this.pkGroupCourse = pkGroupCourse;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "PK_COACH")
	public TCoach getTCoach() {
		return this.TCoach;
	}

	public void setTCoach(TCoach TCoach) {
		this.TCoach = TCoach;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "PK_COURSE_DETAIL")
	public TCourseDetail getTCourseDetail() {
		return this.TCourseDetail;
	}

	public void setTCourseDetail(TCourseDetail TCourseDetail) {
		this.TCourseDetail = TCourseDetail;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "PK_PLACE")
	public TPlace getTPlace() {
		return this.TPlace;
	}

	public void setTPlace(TPlace TPlace) {
		this.TPlace = TPlace;
	}

	@Column(name = "NAME", length = 50)
	public String getName() {
		return this.name;
	}

	public void setName(String name) {
		this.name = name;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "BEGIN_DATETIME", length = 19)
	public Date getBeginDatetime() {
		return this.beginDatetime;
	}

	public void setBeginDatetime(Date beginDatetime) {
		this.beginDatetime = beginDatetime;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "END_DATETIME", length = 19)
	public Date getEndDatetime() {
		return this.endDatetime;
	}

	public void setEndDatetime(Date endDatetime) {
		this.endDatetime = endDatetime;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "CDATETIME", length = 19)
	public Date getCdatetime() {
		return this.cdatetime;
	}

	public void setCdatetime(Date cdatetime) {
		this.cdatetime = cdatetime;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "MDATETIME", length = 19)
	public Date getMdatetime() {
		return this.mdatetime;
	}

	public void setMdatetime(Date mdatetime) {
		this.mdatetime = mdatetime;
	}

	@Column(name = "PLACE", length = 64)
	public String getPlace() {
		return this.place;
	}

	public void setPlace(String place) {
		this.place = place;
	}

	@ManyToMany(fetch = FetchType.LAZY, mappedBy = "TGroupCourses")
	public Set<TMember> getTMembers() {
		return this.TMembers;
	}

	public void setTMembers(Set<TMember> TMembers) {
		this.TMembers = TMembers;
	}

}
